home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-05-09 | 1.1 KB | 34 lines | [TEXT/PICN] |
- ############################################################################
- #
- # print.icn
- #
- # This program prints files. The user is prompted with a Get File
- # dialog. For the first file, the user is presented with a Page Setup ...
- # dialog and a Print Job dialog. These dialogs are omitted for
- # subsequent files. Files are processed until the user selects Cancel
- # in a Get File dialog.
- #
- # There is no restriction on file type, so printing an application
- # or other non-text file may produce unpredictable results. To restrict
- # file types, change the getfile() function call to:
- #
- # getfile("File? (last was " || name ||" )", "TEXT")
- #
- # The file is first read in to an invisible window, so only files
- # that fit in ProIcon's memory space may be printed.
- #
- #############################################################################
-
- procedure main()
- local name, setup, job, window
-
- name := "..."
- setup := job := 1
-
- while name := getfile("File? (last was " || name ||" )") do {
- window := wopen(name,"f") | stop("*** cannot open ",name)
- wprint(window,setup,job)
- setup := job := 0
- wclose(window)
- }
- end